package com.seele.tigerwallet.ui.views;

import android.content.Context;
import android.util.AttributeSet;
import android.widget.ScrollView;

public class TranslucentScrollView extends ScrollView {
    private   OnScrollChangedListener mListener;

    public interface OnScrollChangedListener {
        void onScrollChanged(int l, int t, int oldl, int oldt);

    }

    public void  addOnScrollChangedListener(OnScrollChangedListener listener){

        this.mListener=listener;
    }

    public TranslucentScrollView(Context context) {
        super(context);
    }

    public TranslucentScrollView(Context context, AttributeSet attrs) {
        super(context, attrs);
    }

    public TranslucentScrollView(Context context, AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);
    }

    @Override
    protected void onScrollChanged(int l, int t, int oldl, int oldt) {
        if (null!=mListener){
            mListener.onScrollChanged(l,t,oldl,oldt);
        }
        super.onScrollChanged(l, t, oldl, oldt);
    }
}
